x86/levelling: Avoid NULL pointer dereference
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 25 Sep 2017 16:24:46 +0000 (17:24 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 26 Sep 2017 09:33:35 +0000 (10:33 +0100)
commitd73e68c08f1f13e2622b6fa1d2ce0a9e77263d54
treea86c142e4effe69d2c32b7449f872f1673fc0144
parent55b33293c399e577f1a2b6cc933ced955615e63a
x86/levelling: Avoid NULL pointer dereference

Coverity points out that next is indeed NULL at times.  Only try to read the
.cpuid_faulting field when we sure that next isn't NULL.

Fixes e7a370733bd "x86: replace arch_vcpu::cpuid_faulting with msr_vcpu_policy"

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/intel.c